home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / tip / parv-1.tip < prev    next >
Text File  |  1993-09-15  |  2KB  |  90 lines

  1. % This macro source file is from the four volume series
  2. % "TeX in Practice" by Stephan von Bechtolsheim, published
  3. % 1993 by Springer-Verlag, New York.
  4. % Copyright 1993 Stephan von Bechtolsheim.
  5. % No warranty or liability is assumed.
  6. % This macro may be copied freely if no fees other than
  7. % media cost or shipping charges are charged and as long
  8. % as this copyright and the following source code itself
  9. % is not changed. Please see the series for further information.
  10. %
  11. % Version: 1.0
  12. % Date: May 1, 1993
  13. %
  14. %
  15. % This source code is documented in 11.2.1, p. II-67.
  16. % Original source in file "par2.TEX", starting line 956.
  17. \wlog{L: "parv-1.tip" ["par2.TEX," l. 956, p. II-67]}%
  18. % This file DOES belong to format "texip."
  19. \catcode`\@ = 11
  20. \newdimen \Delta@XY
  21. \newskip\@ParListBeforeAfter
  22. \newskip\@ParListBetweenLabels
  23. \newskip\@ParListAfterLabel
  24. \newcount\@LabeledParNesting    \@LabeledParNesting = 0
  25. \newcount\@LabelCounter
  26. \def\BeginAList #1#2#3#4#5#6#7{%
  27.     \par
  28.     \bgroup
  29.     \advance\leftskip by #1
  30.     \advance\rightskip by #2
  31.     \advance \@LabeledParNesting by 1
  32.     \@LabelCounter = 0
  33.     \Delta@XY = #3
  34.     \ifdim\Delta@XY < 0pt
  35.         \errmessage{\string\BeginAList: negative Delta{xy},
  36.             made positive.}%
  37.     \fi
  38.     \@ParListBeforeAfter = #4   
  39.     \@ParListBetweenLabels = #5
  40.     \@ParListAfterLabel = #6
  41.     \SetParIndent{#7}
  42. }
  43. \def\EndAList{% 
  44.     \par
  45.     \vskip\@ParListBeforeAfter
  46.     \egroup
  47. }
  48. \def\@GenLabel #1{%
  49.     \par
  50.     \advance\@LabelCounter by 1
  51.     \ifnum\@LabelCounter = 1
  52.         \parskip = \@ParListBeforeAfter
  53.     \else
  54.         \parskip = \@ParListBetweenLabels
  55.     \fi
  56.     \noindent
  57.     \hbox to 0pt{#1}%
  58.     \parskip = \@ParListAfterLabel
  59.     \ignorespaces
  60. }
  61. \def\ItemLL #1{% 
  62.     \@GenLabel{%
  63.         \hskip -\Delta@XY
  64.         #1%
  65.         \hfil
  66.     }%
  67. }
  68. \def\ItemLR #1{%
  69.     \@GenLabel{%
  70.         \hss
  71.         #1%
  72.         \hskip\Delta@XY
  73.     }%
  74. }
  75. \def\ItemRL #1{%
  76.     \@GenLabel{%
  77.         \hskip\Delta@XY
  78.         #1%
  79.         \hss
  80.     }%
  81. }
  82. \def\ItemRR #1{%
  83.     \@GenLabel{%
  84.         \hfil
  85.         #1%
  86.         \hskip -\Delta@XY
  87.     }%
  88. }
  89. \catcode`\@ = 12
  90.